package com.ccp.dev.workflow.dao;

import com.ccp.dev.core.basic.base.IBaseMapper;
import com.ccp.dev.workflow.model.AgentSetting;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * ClassDescribe 代理设定 Dao类
 * @author: fanruiqi
 * Date: 2019-09-20
 * Since:1
 * To change this template use File | Settings | File Templates.
 */
public interface AgentSettingDao extends IBaseMapper<AgentSetting, String> {
    /**
     *
     * @param flowKey
     * @param params
     * @return
     */
    List<AgentSetting> queryByFlowKey(String flowKey, Map<String, Object> params);

    /**
     *
     * @param params
     * @return
     */
    List<AgentSetting> queryAgentByFilter(Map<String, Object> params);

    /**
     * 获取代理设置信息
     * @param flowKey 流程key
     * @param sysUserId 用户id
     * @param currentDate 当前时间
     * @return
     */
    AgentSetting getValidByFlowAndAuthIdAndDate(@Param("flowKey") String flowKey, @Param("authId") String sysUserId, @Param("date") Date currentDate);
}
